<template>
  <div class="app-container">
    <header class="app-header">
      <div class="logo">
        <h1>TinyPNG Pro</h1>
        <span class="subtitle">图片压缩与格式转换工具</span>
      </div>
      <nav class="nav-menu">
        <router-link to="/">图片压缩</router-link>
        <router-link to="/convert">格式转换</router-link>
        <router-link to="/about">关于</router-link>
      </nav>
    </header>
    
    <main class="app-content">
      <router-view />
    </main>
    
    <footer class="app-footer">
      <p>&copy; {{ new Date().getFullYear() }} TinyPNG Pro. 保留所有权利。</p>
    </footer>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  background-color: #f5f7fa;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  background-color: #409EFF;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

.subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav-menu a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transition: width 0.3s;
}

.nav-menu a:hover:after,
.nav-menu a.router-link-active:after {
  width: 100%;
}

.app-content {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.app-footer {
  background-color: #f0f2f5;
  padding: 1.5rem;
  text-align: center;
  color: #606266;
  font-size: 0.9rem;
}
</style>